Re: [NTG-context] Taco's \molecule fails in mkiv

2009-02-24 Thread Wolfgang Schuster
molecule_lpeg.tex Description: Binary data Am 23.02.2009 um 18:14 schrieb Mojca Miklavec: thanks a lot for the very nice code :) :) :) The second example (H_2^+) does not return expected result - it should have been H\lohi{2}{+} instead, but I don't require such cases for the current

[NTG-context] Taco's \molecule fails in mkiv

2009-02-23 Thread Mojca Miklavec
[small]#1}}\fi } \def\finishchem% {\ifvoid\chemlowbox \else \iffluor \fluorfalse \kern-.1em \fi\low{\box\chemlowbox}\fi} % for kerning after F \newif\iffluor \unexpanded\def\molecule% {\bgroup \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}% \catcode`\^=\active \uccode

Re: [NTG-context] Taco's \molecule fails in mkiv

2009-02-23 Thread Wolfgang Schuster
) end \stopluacode \def\molecule#1{\ctxlua{thirddata.molecule('#1')}} \starttext \molecule{H_2SO_4} \molecule{H_2^+} \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry

Re: [NTG-context] Taco's \molecule fails in mkiv

2009-02-23 Thread luigi scarso
(text) text = string.gsub(text,_,\\low) text = string.gsub(text,%^,\\high) tex.sprint(text) end \stopluacode \def\molecule#1{\ctxlua{thirddata.molecule('#1')}} hmm Isn't better to remember original \molecule ? I mean, something like \let\ORIGINALmolecule\molecule \def\molecule#1